package com.btm.distrb.model;

import java.util.Map;

public class Table {

    private String tableName;
    private Map<String,Column> column;
    private String catalog;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public Map<String, Column> getColumn() {
        return column;
    }

    public void setColumn(Map<String, Column> column) {
        this.column = column;
    }

    public String getCatalog() {
        return catalog;
    }

    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }

    @Override
    public boolean equals(Object obj) {
        if (null == obj){
            return false;
        }
        if (obj == this){
            return true;
        }
        if (obj instanceof Column){
            Table table = (Table)obj;
            return table.getTableName().equals(this.tableName) &&
                    table.getCatalog().equals(this.catalog) &&
                    table.getColumn().equals(this.column);
        }else{
            return false;
        }
    }
}
